package com.liruo.learn.spring.mvc.controller.mvc;

import javax.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author:liruo
 * @Date:2023-06-25-20:07:36
 * @Desc
 */
@RequestMapping("/ParamTest")
@RestController
public class ParamTestController {
  //HttpServletRequest 只有form-data才能调用getPart获取, 值是ApplicationPart, 文件内容是参数值, 但是如果不是文件可以当成Parameter, 文件只能用getPart获取
  @PostMapping
  public String form(HttpServletRequest req){
    System.out.println(req);
    return "ok";
  }
}
